import Vue from 'vue'
import Router from 'vue-router'

import Login from './views/System/Login.vue'
import Home from './views/System/Home.vue'
import Index from './views/System/Index.vue'
import Doctors from './views/Doctors/Index.vue'
import Suffers from './views/Suffers/Index.vue'
import Treatments from './views/Treatments/Index.vue'
import TreatmentsList from './views/Treatments/TreatmentsList.vue'
import TreatmentsProject from './views/TreatmentProject/Index.vue'
import ProjectList from './views/TreatmentProject/ProjectList.vue'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/login',
      name: 'login',
      component: Login
    },
    {
      path: '/',
      name: 'home',
      component: Home,
      children: [
        {
          path: '/',
          name: 'home_index',
          component: Index,
          meta: {
            title: '首页'
          }
        },
        {
          path: '/doctors',
          name: 'doctors',
          component: Doctors,
          meta: {
            title: '医生管理'
          }
        },
        {
          path: '/suffers',
          name: 'suffers',
          component: Suffers,
          meta: {
            title: '患者管理'
          }
        },
        {
          path: '/treatments/treatmentslist',
          name: 'treatmentslist',
          component: TreatmentsList,
          meta: {
            title: '治疗师列表'
          }
        },
        {
          path: '/treatments',
          name: 'treatments',
          component: Treatments,
          meta: {
            title: '治疗师分类'
          }
        },
        {
          path: '/treatmentsproject/projectlist',
          name: 'projectlist',
          component: ProjectList,
          meta: {
            title: '治疗项目列表'
          }
        },
        {
          path: '/treatmentsproject',
          name: 'treatmentsproject',
          component: TreatmentsProject,
          meta: {
            title: '治疗师类别'
          }
        },
      ]
    }
  ]
})
